package com.school.campus.domain;

import java.math.BigDecimal;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.school.common.annotation.Excel;
import com.school.common.core.domain.BaseEntity;

/**
 * 货物对象 goods
 *
 * @author wwj
 * @date 2025-11-04
 */
public class Goods extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID（自增）
     */
    private Long id;

    /**
     * 货物编号（唯一标识）
     */
    @Excel(name = "货物编号", readConverterExp = "唯=一标识")
    private String code;

    /**
     * 货物名称
     */
    @Excel(name = "货物名称")
    private String name;

    /**
     * 图片路径（可存储URL或本地路径）
     */
    @Excel(name = "图片路径", readConverterExp = "可=存储URL或本地路径")
    private String image;

    /**
     * 售价（保留2位小数）
     */
    @Excel(name = "售价", readConverterExp = "保=留2位小数")
    private BigDecimal sellingPrice;

    /**
     * 所属售货机ID
     */
    @Excel(name = "所属售货机ID")
    private Long vendingMachineId;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getCode() {
        return code;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getImage() {
        return image;
    }

    public void setSellingPrice(BigDecimal sellingPrice) {
        this.sellingPrice = sellingPrice;
    }

    public BigDecimal getSellingPrice() {
        return sellingPrice;
    }

    public void setVendingMachineId(Long vendingMachineId) {
        this.vendingMachineId = vendingMachineId;
    }

    public Long getVendingMachineId() {
        return vendingMachineId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("code", getCode())
                .append("name", getName())
                .append("image", getImage())
                .append("sellingPrice", getSellingPrice())
                .append("vendingMachineId", getVendingMachineId())
                .toString();
    }
}
